package com.java.base.javabase.thread.pool.dataSummary;

import lombok.extern.slf4j.Slf4j;

import java.util.Random;
import java.util.concurrent.Callable;

/**
 *@ClassName 业务线程
 *@Description TODO
 *@Author FangShanShan
 *@Date 2020/8/7 11:17
 *@Version 1.0
 */
@Slf4j
public class DealTask  implements Callable<Integer> {
    private int resultFlag;


    public  DealTask(int reusltFlag) {
        this.resultFlag= reusltFlag;
    }

    @Override
    public Integer call() throws Exception {
        Thread.sleep(new Random().nextInt(10) * 1000); // 随机睡眠时间
        log.info(">>> 线程：[{}] 开始处理业务", Thread.currentThread().getName());

        return 1;
    }
}
